/**
 * Created by hdw on 2017/5/16.
 */
import React, {Component} from 'react'
import '../sass/Title'

export default class Title extends Component {
  constructor() {
    super()
  }
  render() {
    let {title} = this.props

    if (title.length) {
      return (
          <div className="home-title">
              <h1>
                  <span><img src={require('../images/l.png')} alt=""/></span>
                  <span>{title[0].mainTitle}</span>
                  <span><img src={require('../images/r.png')} alt=""/></span>
              </h1>
              <h2>
                  {title[0].subtitle}
              </h2>
          </div>
      )
    } else {
      return (
        <div></div>
      )
    }
  }
}
